/**
 * Created by zouwenchang on 2017/11/27.
 */
import axios from 'axios';
let base= window.requestURL.devURL;



export const addressInfo={
    getAllAddres(url,params){
      return axios.post(`${base}`+url,params).then(res => res).catch(err=>err);
    }
}

export const getProductInfo={
      getALLProduct(url,params){
        return  axios.post(`${base}`+url,params).then(res => res).catch(err=>err);
      },
     getRequest(url,params){

       return axios.get(`${base}`+url,{params:params,headers:{"Content-Type":"application/x-www-from-urlencoded"}}).then(res => res).catch(err=>err);
     },
    getWithCode(url,params){

      return axios.get(`${base}`+url,{params:params,headers:{"Content-Type":"application/x-www-from-urlencoded"}}).then(res => res).catch(err=>err);
    },
    loginRequest(url,params){
      return axios.get(url,{params}).then(res => res).catch(err=>err);
    }
}
